package cn.anlaser.status;

/**
 * @author jskyme
 * unValid 暂未使用
 */
public enum FlagEnum {
	create("0", "新建"),valid("1", "有效"),unValid("2", "无效"),delete("3", "删除");
	private String code;
	private String title;

	FlagEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static FlagEnum findByCode(String code) {
		for (FlagEnum userKind : FlagEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
